package com.ita.core;

import com.ita.dataset.DoubleLinkedList;
import com.ita.entity.Customer;
import com.ita.util.Data;

/***
 * singleton pattern
 * 
 * @author Elvis
 *
 */
public class CustomerListFactory {

	private static DoubleLinkedList<Customer> cList;

	private CustomerListFactory() {

	}

	public static DoubleLinkedList<Customer> getInstance() {
		cList = new DoubleLinkedList<Customer>();
		cList.init(Data.customers);
		return cList;
	}

	public static void main(String[] args) {
		System.out.println(getInstance().getLength());
		System.out.println(getInstance().listLength());
	}

}
